package com.rockcent.mall.lib.domain;

import com.rockcent.common.domain.IDEntityMall;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;

/**
 * 财务设置
 * Created by zhangjh on 2017/3/29.
 */
@Entity
@Table(name = "mall_financial_settings")
@DynamicInsert
@DynamicUpdate
public class MallFinancialSettings extends IDEntityMall {
    /**
     * 平台ID
     */
    @Column(columnDefinition = "bigint comment '平台ID'")
    private Long mallId;

    /**
     *试用期天数
     */
    @Column(columnDefinition = "bigint default 0 comment'试用期天数'")
    private Long  probationDays;

    /**
     * 基础服务费
     */
    @Column(columnDefinition = "DECIMAL(30,10) default 0 comment '基础服务费'")
    private BigDecimal baseServiceFee;


    /**
     * 平台服务费率
     */
    @Column(columnDefinition = "DECIMAL(30,10) default 0 comment '平台服务费率'")
    private BigDecimal businessServiceFeeRate;


    /**
     * 分享返利率
     */
    @Column(columnDefinition = "DECIMAL(30,10) default 0 comment '分享返利率'")
    private BigDecimal shareFeeRate;

    public Long getMallId() {
        return mallId;
    }

    public void setMallId(Long mallId) {
        this.mallId = mallId;
    }

    public BigDecimal getBaseServiceFee() {
        return baseServiceFee;
    }

    public void setBaseServiceFee(BigDecimal baseServiceFee) {
        this.baseServiceFee = baseServiceFee;
    }

    public BigDecimal getBusinessServiceFeeRate() {
        return businessServiceFeeRate;
    }

    public void setBusinessServiceFeeRate(BigDecimal businessServiceFeeRate) {
        this.businessServiceFeeRate = businessServiceFeeRate;
    }

    public BigDecimal getShareFeeRate() {
        return shareFeeRate;
    }

    public void setShareFeeRate(BigDecimal shareFeeRate) {
        this.shareFeeRate = shareFeeRate;
    }

    public Long getProbationDays() {
        return probationDays;
    }

    public void setProbationDays(Long probationDays) {
        this.probationDays = probationDays;
    }

    @Override
    public String toString() {
        return "MallFinancialSettings{" +
                "mallId=" + mallId +
                ", id=" + id +
                ", probationDays=" + probationDays +
                ", dateCreated=" + dateCreated +
                ", baseServiceFee=" + baseServiceFee +
                ", lastUpdated=" + lastUpdated +
                ", businessServiceFeeRate='" + businessServiceFeeRate + '\'' +
                ", isDelete=" + isDelete +
                ", version=" + version +
                ", shareFeeRate=" + shareFeeRate +
                '}';
    }
}
